package cn.acewill.yxd.yunxundian.ui.sign;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;

import cn.acewill.yxd.yunxundian.R;
import cn.acewill.yxd.yunxundian.componet.photoCrop.ZoomImageView;

/**
 * Created by XXX on 2017/5/23.
 */

public class ImgDetailActivity extends AppCompatActivity {

    private Bitmap bitmap;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.photodetailview);
        String fileName = getIntent().getStringExtra("filepath");
        ZoomImageView zoomImageView = (ZoomImageView) findViewById(R.id.zoom_img);
        //不能识别网络图片，
        bitmap= BitmapFactory.decodeFile(fileName);
        zoomImageView.setImageBitmap(bitmap);

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (bitmap!=null){
            bitmap.recycle();
        }
    }

}
